<?php

/**
 * @author christian
 * @copyright 2011
 * @abstract carga de todo el itinerario que es parte de un tour del itenario del tour
 */
 
 

$ruta=$_SERVER['DOCUMENT_ROOT']."/viventura"."/MDOperator";
$ruta2=$_SERVER['DOCUMENT_ROOT']."/viventura"."/MDTour";

include_once("$ruta/view/MDOperatorsDraw.php");

include_once("$ruta2/MDTourGeneral/CDrawPageReg.php");

include_once("$ruta/view/CDrawMenuTour.php");
include_once("$ruta/star.php");


//CDrawMenuTour::getinstance()->setMenuDisplay($items);

CDrawMenuTour::getInstance()->rigth_side_begin();//empieza lado derecho 
CDrawMenuTour::getInstance()->DrawDivAdBegin("content_area_user_title","1");echo "<h1>Destino Sur</h1>";


$title="Operadores turísticos";

$maintable="operador"; //se pasa el id de la tabla que relaciona track y tour

$columnas = array("idOpe"=>"Id", "NamOpe"=>"Nombre del operador","DirOpe"=>"Direccion del operador","MailOpe"=>"Direccion-mail","PhoOpe"=>"Telefono del operador");
MDOperatorsDraw::getInstance()->DrawTable($title,$maintable,$columnas);

//$table="oficinas";
//$campos=array("idOfi","DirOfi");
//$name="Oficina";
//MDPacksDraw::getInstance()->DrawSelect($table,$campos,$name);
echo "<p align='right'>";
CDrawPageReg::getInstance()->DrawButton("Añadir servicio","view/COperadorServicio.php");
echo "</p>";
        
     
    /////////////////Area de registro /////////////////////
CDrawPageReg::getInstance()->DrawHideSectionBeg();
    
    echo "<p align='center'>";
    $action="view/CRegistroOperador.php?default=1";$name="formulario_registro";$method="post";$NAME="Registro de operador turístico";
    CDrawPageReg::getInstance()->DrawHead($action,$name,$method,$NAME);
    echo "</p>";
    CDrawPageReg::getInstance()->readOnly("operador","idOpe");
  
    $val_operadores = array (":required");
    $operadores = array("NamOpe"=>"Nombre");
    CDrawPageReg::getInstance()->DrawTextBox($operadores,$val_operadores);
    
    echo "<h2>Contacto</h2>";
    $val_coperadores = array (":required",":required");
    $coperadores=array("FirstConOpe"=>"Nombre del contacto","LastConOpe"=>"Apellidos del contacto");
    CDrawPageReg::getInstance()->DrawTextBox($coperadores,$val_coperadores);

    echo "<h2>Ubicación</h2>";    
    echo "<div id='dashboard_info'>";
         $campos = array("idCit"=>"idCit", "NamCit"=>"NamCit");
        CDrawPageReg::getInstance()->DrawSelect("city", $campos, "Ciudad","idCit");
    
        $val_koperadores = array (":required");
        $koperadores =array("DirOpe"=>"Dirección");
        CDrawPageReg::getInstance()->DrawTextBox($koperadores,$val_koperadores);
 
    
    echo "</div>";

    $val_toperadores = array (":integer",":mail","integer",":integer",":url");
    $toperadores=array("PhoOpe"=>"Telefono","MailOpe"=>"Correo electrónico","FaxOpe"=>"Fax","CodPosOpe"=>"Código Postal","WebSitOpe"=>"Sitio Web");
    CDrawPageReg::getInstance()->DrawTextBox($toperadores,$val_toperadores);
    
    $items = array("CommOpe"=>"Detalles del operador");
    $val_items = array("");
    CDrawPageReg::getInstance()->DrawTextBoxArea($items,$val_items);
      
    echo "<p align='right'>";
    CDrawPageReg::getInstance()->DrawSubmmit("Añadir");
    echo "</p>";
    echo "</div>";

CDrawPageReg::getInstance()->DrawHideSectionEnd("Añadir operador / Ocultar");

CDrawPageReg::getInstance()->DrawFoot();
CDrawMenuTour::getInstance()->rigth_side_end();

CDrawPageReg::getInstance()->DrawButton("Ver default tours","MDTourGeneral/index.php?default=1");
   
CDrawMenuTour::getInstance()->DrawDivAdEnd();






?>